package javaCode;

/**
 * Created by lxy_920912 on 24/04/2017.
 */
public class LeetCode92 {
    public ListNode reverseBetween(ListNode head, int m, int n) {
        ListNode pre = null;
        ListNode p = head;
        ListNode pNext = head.next;
        int count = 1;
        while(p!= null && pNext != null){
            while (count < m){
                p = p.next;
                pNext = pNext.next;
                count++;
            }
        }

        return head;
    }
}
